<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>

        div{
            font-size: 13px;
        }
    </style>
</head>
<body>
<div id="money">账户余额:</div>
<input type="text" id="mima" value="88888888">
<input onclick="zh()"id="yue" type="button"value="隐藏">
<script>
    var ab=true;

    function zh() {
        if (ab){
            document.getElementById("mima").type='password'
            ab=false;
            yue.value="显示"
        }else{
            document.getElementById("mima").type='text'
            ab=true;
            yue.value="隐藏"
        }



    }

    var idcard='34012320001118084x'
    var a=idcard.substring(0,6)
    var b=idcard.substring(14,19)
    document.write(a+'********'+b)
</script>

</body>
</html>